/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.targeter.rulesengine.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;

/**
 * This class is used by SOAP remote services.
 *
 * @author    jsalaice
 * @generated
 */
public class rulesSoap implements Serializable {
	public static rulesSoap toSoapModel(rules model) {
		rulesSoap soapModel = new rulesSoap();

		soapModel.setRuleId(model.getRuleId());
		soapModel.setModel(model.getModel());
		soapModel.setRuleName(model.getRuleName());
		soapModel.setActive(model.getActive());
		soapModel.setDrlFile(model.getDrlFile());

		return soapModel;
	}

	public static rulesSoap[] toSoapModels(rules[] models) {
		rulesSoap[] soapModels = new rulesSoap[models.length];

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModel(models[i]);
		}

		return soapModels;
	}

	public static rulesSoap[][] toSoapModels(rules[][] models) {
		rulesSoap[][] soapModels = null;

		if (models.length > 0) {
			soapModels = new rulesSoap[models.length][models[0].length];
		}
		else {
			soapModels = new rulesSoap[0][0];
		}

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModels(models[i]);
		}

		return soapModels;
	}

	public static rulesSoap[] toSoapModels(List<rules> models) {
		List<rulesSoap> soapModels = new ArrayList<rulesSoap>(models.size());

		for (rules model : models) {
			soapModels.add(toSoapModel(model));
		}

		return soapModels.toArray(new rulesSoap[soapModels.size()]);
	}

	public rulesSoap() {
	}

	public long getPrimaryKey() {
		return _ruleId;
	}

	public void setPrimaryKey(long pk) {
		setRuleId(pk);
	}

	public long getRuleId() {
		return _ruleId;
	}

	public void setRuleId(long ruleId) {
		_ruleId = ruleId;
	}

	public String getModel() {
		return _model;
	}

	public void setModel(String model) {
		_model = model;
	}

	public String getRuleName() {
		return _ruleName;
	}

	public void setRuleName(String ruleName) {
		_ruleName = ruleName;
	}

	public boolean getActive() {
		return _active;
	}

	public boolean isActive() {
		return _active;
	}

	public void setActive(boolean active) {
		_active = active;
	}

	public String getDrlFile() {
		return _drlFile;
	}

	public void setDrlFile(String drlFile) {
		_drlFile = drlFile;
	}

	private long _ruleId;
	private String _model;
	private String _ruleName;
	private boolean _active;
	private String _drlFile;
}